import json

import config


class JsonUtil:

    #封装读取json文件的方法 [()]
    @classmethod
    def read_json(cls,file):
        with open(file,"r",encoding="utf-8") as f:
            data =json.load(f)
            #定义列表来保存数据
            list1 = []
            for i in data:
                temp = tuple(i.values())
                list1.append(temp)

        return list1

if __name__ == '__main__':
    print(JsonUtil.read_json(config.base_dir+"/data/login.json"))
